﻿using System;
using System.Windows.Forms;
using Server.Model;

namespace Server.Menus
{
    public partial class KnownServers : Form
    {
        private readonly ServerData _servData;

        public KnownServers( ServerData servData )
        {
            _servData = servData;
            InitializeComponent( );
        }

        private void KnownServers_Activated( object sender, EventArgs e )
        {
            listBox1.Items.Clear( );
            foreach( String name in _servData.ServersInformation.ServersLocation.Keys )
            {
                listBox1.Items.Add( name );
            }
        }

        private void button1_Click( object sender, EventArgs e )
        {
            Hide( );
        }
    }
}